dir(path="ADdata2.csv")
ADdata1<-read.table("E:/R Studio/shixi/shixi 3/ADdata/ADdata1.txt",header=TRUE)#读取txt文件
ADdata2<-read.csv("E:/R Studio/shixi/shixi 3/ADdata/ADdata2.csv",header = TRUE,sep=",")#读取csv文件
install.packages("readxl") 
library(readxl)
ADdata3<- read_excel("E:/R Studio/shixi/shixi 3/ADdata/ADdata3.xlsx", sheet = "Sheet 1")#读取xlsx文件
ADdata4<-read.table("E:/R Studio/shixi/shixi 3/ADdata/ADdata4.txt", header = TRUE,sep=" ")#读取txt文件
mergedata1<-merge(ADdata1,ADdata2)#将data1和data2合并成新的mergedata1
mergedata2<-merge(ADdata3,mergedata1)#将data3与mergedata1合并
mergedata<-merge(ADdata4,mergedata2)#将mergedata2与data4合并
install.packages("writexl")
library(writexl)
write.csv(mergedata,file="E:/RStudio/实习三/ADdata/mergedata.csv")#将mergedata保存为csv文件
write.xlsx(mergedata,file="E:/RStudio/实习三/ADdata/mergedata.xlsx")#将mergedata保存为xlsx文件
write.table(mergedata,file="E:/RStudio/实习三/ADdata/mergedata.txt")#将mergedata保存为Txt文件
install.packages("openxlsx")
library(openxlsx)
